home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / IndexedCollection.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-18  |  2.0 KB  |  67 lines

  1. /* Interface for Objective-C Sequential Collection object.
  2.    Copyright (C) 1993,1994 Free Software Foundation, Inc.
  3.  
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: May 1993
  6.  
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.  
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. */ 
  23.  
  24. #ifndef __IndexedCollection_h_INCLUDE_GNU
  25. #define __IndexedCollection_h_INCLUDE_GNU
  26.  
  27. #include <objects/stdobjects.h>
  28. #include <objects/KeyedCollection.h>
  29. #include <objects/IndexedCollecting.h>
  30.  
  31. @interface IndexedCollection : KeyedCollection <IndexedCollecting>
  32.  
  33. @end
  34.  
  35. /* The only subclassResponsibilities in IndexedCollection are:
  36.  
  37.       insertElement:atIndex:
  38.       removeElementAtIndex:
  39.       elementAtIndex:
  40.  
  41.    but subclass will want to override others as well in order to 
  42.    increase efficiency.  The following are especially important if
  43.    the subclass's implementation of "elementAtIndex:" is not efficient:
  44.  
  45.       replaceElementAtIndex:with:
  46.       swapAtIndeces::
  47.       shallowCopyReplaceFrom:to:with:
  48.       sortAddElement:byCalling:
  49.       removeElement:
  50.       firstElement
  51.       lastElement
  52.       shallowCopyFrom:to:
  53.       withElementsCall:whileTrue:
  54.       withElementsInReverseCall:whileTrue:
  55.  
  56.    and perhaps:
  57.  
  58.       appendElement:
  59.       prependElement:
  60.       indexOfElement:
  61.       withElementsInReverseCall:
  62.  
  63. */
  64.  
  65.  
  66. #endif /* __IndexedCollection_h_INCLUDE_GNU */
  67.